﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Meqs.Entity
{
    /// <summary>
    /// 评估设置
    /// </summary>
    [Serializable]
    public class EvalSettings
    {
        private int _rID;
        private int _destID;
        private string _taskIDList;
        private string _researchIDList;
        private string _gradeList;
        private EvalType _evalType;

        public EvalSettings()
        {
        }

        public EvalSettings(int rID, int destID, string taskIDList, string researchIDList, string gradeList, EvalType evalType)
        {
            _rID = rID;
            _destID = destID;
            _taskIDList = taskIDList;
            _researchIDList = researchIDList;
            _gradeList = gradeList;
            _evalType = evalType;
        }

        /// <summary>
        /// ID
        /// </summary>
        public int RID
        {
            get { return _rID; }
            set { _rID = value; }
        }

        /// <summary>
        /// 被评教师ID
        /// </summary>
        public int DestID
        {
            get { return _destID; }
            set { _destID = value; }
        }

        /// <summary>
        /// 负责项目ID集合
        /// </summary>
        public string TaskIDList
        {
            get { return _taskIDList; }
            set { _taskIDList = value; }
        }

        /// <summary>
        /// 负责教研组ID集合
        /// </summary>
        public string ResearchIDList
        {
            get { return _researchIDList; }
            set { _researchIDList = value; }
        }

        /// <summary>
        /// 负责年级组集合
        /// </summary>
        public string GradeList
        {
            get { return _gradeList; }
            set { _gradeList = value; }
        }

        public bool Equals(EvalSettings other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;
            return other._rID == _rID;
        }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            if (obj.GetType() != typeof (EvalSettings)) return false;
            return Equals((EvalSettings) obj);
        }

        public override int GetHashCode()
        {
            return _rID;
        }

        public EvalType EvalType
        {
            get { return this._evalType; }
            set { this._evalType = value; }
        }
    }
}
